let Sequelize = require('sequelize');
let {sequelize} = require('../sequelize.js');

let user = sequelize.define('user', {
      id: {
        type: Sequelize.BIGINT(11),
        primaryKey: true,
        allowNull: false,
        unique: true,
        autoIncrement: true
      },
      name: Sequelize.STRING(25),
      phone: Sequelize.STRING(11),
      create_time: Sequelize.DATE
    },
    {
      timestamps: false, // 不要默认时间戳 数据库没有时间戳字段时，设置为false，否则报错  SequelizeDatabaseError: Unknown column 'createdAt' in 'field list'
      freezeTableName: true
    }
);

module.exports = user;
